<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>致我的女孩</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Microsoft YaHei', sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, #ffafbd, #ffc3a0);
            color: #5a3e36;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }
        
        .container {
            max-width: 800px;
            width: 100%;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            padding: 40px 30px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }
        
        .header {
            margin-bottom: 40px;
        }
        
        .header h1 {
            font-size: 2.5rem;
            color: #d46a6a;
            margin-bottom: 15px;
            text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
        }
        
        .header p {
            font-size: 1.2rem;
            color: #8c5e5e;
        }
        
        .message-area {
            min-height: 200px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            margin: 30px 0;
            padding: 20px;
            background: rgba(255, 255, 255, 0.7);
            border-radius: 15px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
        }
        
        .message {
            font-size: 1.5rem;
            line-height: 1.6;
            color: #5a3e36;
            margin: 15px 0;
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.8s ease, transform 0.8s ease;
        }
        
        .message.active {
            opacity: 1;
            transform: translateY(0);
        }
        
        .btn {
            background: linear-gradient(to right, #ffafbd, #ffc3a0);
            border: none;
            padding: 15px 40px;
            border-radius: 50px;
            color: white;
            font-size: 1.2rem;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            margin-top: 20px;
        }
        
        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        }
        
        .btn:active {
            transform: translateY(1px);
        }
        
        .footer {
            margin-top: 40px;
            color: #8c5e5e;
            font-size: 0.9rem;
        }
        
        .heart {
            color: #ff6b6b;
            display: inline-block;
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }
        
        .floating-hearts {
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            pointer-events: none;
            z-index: -1;
        }
        
        .heart-particle {
            position: absolute;
            font-size: 1.2rem;
            color: rgba(255, 107, 107, 0.5);
            animation: float 8s infinite linear;
        }
        
        @keyframes float {
            0% {
                transform: translateY(100vh) rotate(0deg);
                opacity: 0;
            }
            10% {
                opacity: 1;
            }
            90% {
                opacity: 1;
            }
            100% {
                transform: translateY(-100px) rotate(360deg);
                opacity: 0;
            }
        }
        
        @media (max-width: 768px) {
            .container {
                padding: 25px 20px;
            }
            
            .header h1 {
                font-size: 2rem;
            }
            
            .message {
                font-size: 1.3rem;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="floating-hearts" id="heartsContainer"></div>
        
        <div class="header">
            <h1>致我的女孩 <span class="heart">❤</span></h1>
            <p>点击按钮，看看我想对你说的话...</p>
        </div>
        
        <div class="message-area" id="messageArea">
            <div class="message active" id="message">爱意与歉意</div>
        </div>
        
        <button class="btn" id="nextBtn">点击查看下一条</button>
        
        <div class="footer">
            <p>仅以此页，表达我的心意 <span class="heart">❤</span></p>
        </div>
    </div>

    <script>
        // 情话数组
        const messages = [
            "夜美思你，近来疏陪抱歉",
            "静立相伴无言，已是人间至美",
            "因你人间值得，满心珍惜",
            "少年心动如荒草，长风连天际",
            "纵有傲骨，终输对你的思念",
            "再忙亦抽时间，弥补疏陪的你",
            "你是暖阳梦想，是我的依靠",
            "我的世界，因你才有意义",
            "我们的故事，是我毕生珍藏",
            "用尽算法，难解对你心动"
        ];
        
        let currentIndex = 0;
        const messageElement = document.getElementById('message');
        const nextBtn = document.getElementById('nextBtn');
        
        // 点击按钮显示下一条情话
        nextBtn.addEventListener('click', function() {
            if (currentIndex < messages.length) {
                // 淡出当前消息
                messageElement.classList.remove('active');
                
                setTimeout(() => {
                    // 更新消息内容
                    messageElement.textContent = messages[currentIndex];
                    
                    // 淡入新消息
                    setTimeout(() => {
                        messageElement.classList.add('active');
                    }, 50);
                    
                    currentIndex++;
                    
                    // 如果显示完所有消息，更改按钮文本
                    if (currentIndex === messages.length) {
                        nextBtn.textContent = '重新开始';
                    }
                }, 500);
            } else {
                // 重新开始
                currentIndex = 0;
                
                // 淡出当前消息
                messageElement.classList.remove('active');
                
                setTimeout(() => {
                    // 重置为初始文本
                    messageElement.textContent = "爱意与歉意";
                    
                    // 淡入初始文本
                    setTimeout(() => {
                        messageElement.classList.add('active');
                    }, 50);
                    
                    nextBtn.textContent = '点击查看下一条';
                }, 500);
            }
        });
        
        // 创建漂浮的爱心
        function createHearts() {
            const container = document.getElementById('heartsContainer');
            const heartCount = 15;
            
            for (let i = 0; i < heartCount; i++) {
                const heart = document.createElement('div');
                heart.classList.add('heart-particle');
                heart.innerHTML = '❤';
                heart.style.left = Math.random() * 100 + '%';
                heart.style.animationDelay = Math.random() * 5 + 's';
                heart.style.fontSize = (Math.random() * 0.8 + 0.8) + 'rem';
                container.appendChild(heart);
            }
        }
        
        // 页面加载完成后创建爱心
        window.addEventListener('load', createHearts);
    </script>
</body>
</html>